class data():
    def __init__(self,on_off) -> None:
        self.data_shuffle(on_off)

    def data_shuffle(self,on_off):

        if on_off == 0:
            import random
            arr_buffer = [i for i in range(9)]
            random.shuffle(arr_buffer)
            self.array_buffer = arr_buffer
            self.target_buffer = [0, 1, 2, 3, 4, 5, 6, 7, 8]
        elif on_off == 1:
            self.array_buffer = [[],
            [3, 8, 1, 2, 6, 7, 0, 4, 5], 
            [4, 8, 2, 7, 0, 6, 1, 5, 3], 
            [0, 1, 4, 6, 2, 8, 3, 5, 7], 
            [7, 5, 1, 2, 6, 0, 3, 4, 8],
            [1, 2, 5, 7, 0, 6, 8, 4, 3]]
            self._result = [
                [],
                ['向右', '向上', '向左', '向下', '向右', '向右', '向上', '向左', '向上',
                    '向右', '向下', '向左', '向下', '向右', '向上', '向左', '向左', '向上'],
                ['向左', '向下', '向右', '向右', '向上', '向左', '向上', '向左', '向下', '向下', '向右',
                    '向右', '向上', '向左', '向左', '向下', '向右', '向右', '向上', '向左', '向上', '向左'],
                ['向右', '向下', '向下', '向左', '向上', '向上', '向右', '向下', '向下', '向右',
                    '向上', '向上', '向左', '向左', '向下', '向右', '向右', '向上', '向左', '向左'],
                ['向上', '向左', '向左', '向下', '向下', '向右', '向上', '向上', '向左', '向下', '向下', '向右', '向上', '向右', '向上', '向左', '向下', '向左', '向上']
                ,['向右', '向下', '向左', '向左', '向上', '向右', '向右', '向下', '向左', '向左', '向上', '向右', '向右', '向上', '向左', '向左']
                ]
